package observerPattern.ringEvent;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.EventObject;

/**
 * @author： pang-yun
 * @date： 2021-10-26 11:09
 * 功能目的 ：用于
 */
//铃声事件类：用于封装事件源及一些与事件相关的参数
public class RingEvent extends EventObject {

    private boolean sound;

    public RingEvent(Object source, boolean sound) {
        super(source);
        this.sound = sound;
    }

    public void setSound(boolean sound) {
        this.sound = sound;
    }

    public boolean isSound() {
        return sound;
    }
}
